﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using DataAccess;
using Newtonsoft.Json;
namespace XuaNhapKho.Ajax
{
    public partial class GetSanPham : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"].Trim();
            DataSet ds = KhoDAO.GetBy(id);
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {

                    ltlThongTin.Text = JsonConvert.SerializeObject(ds.Tables[0]);
                }
                else
                {
                    ltlThongTin.Text = "[{\"Error\":1}]";
                }
            }
            else
            {
                ltlThongTin.Text = "[{\"Error\":1}]";
            }
        }
    }
}